package com.jacobson.huobi.mvp.contract

import com.alibaba.fastjson.JSONObject
import com.jacobson.core.mvp.IModel
import com.jacobson.core.mvp.IPresenter
import com.jacobson.core.mvp.IView
import com.jacobson.huobi.entities.UpdateInfo
import com.jacobson.huobi.entities.response.CommonResponse
import io.reactivex.Observable

interface MeContract {
    interface Model : IModel {
        fun refreshToken(): Observable<CommonResponse<JSONObject>>

        fun loadUpdateInfo(): Observable<CommonResponse<UpdateInfo>>

        fun loadNoticeLatest(
        ): Observable<CommonResponse<List<JSONObject>>>

    }

    interface View : IView {
        fun onRefreshTokenResultResp(response: CommonResponse<JSONObject>)

        fun onLoadNoticeLatestResultResp(response: CommonResponse<List<JSONObject>>)
        fun showUpdateDialog(response: CommonResponse<UpdateInfo>)
    }

    interface Presenter : IPresenter {
        fun refreshToken()
        fun loadUpdateInfo()

        fun loadNoticeLatest()
    }
}